import { constantRoutes } from '@/router/index'
const state = {
  routes: [...constantRoutes]
}
const mutations = {
  setRoutes(state, playload) {
    state.routes = [...constantRoutes, ...playload]
  }
}
const actions = {
  permissionRoutes(context, playload) {
    context.commit('setRoutes', playload)
  }
}
export default {
  namespaced: true,
  state,
  mutations,
  actions
}
